package com.itheima.dao;

import com.itheima.domain.Role;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

public interface RoleMapper {

    @Select("select * from sys_role")
    public List<Role> findAll();
    @Insert("insert into sys_role values(#{id},#{roleName},#{roleDesc})")
    public void insert(Role role);
    @Select("select * from l_user_role sur,l_role sr where sur.roleId=sr.Id and sur.userId=#{id}")
    public List<Role> findRoleById(Long id);
}
